home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 16
/
AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso
/
pd
/
anwendungen
/
amicad
/
arexx_english
/
newscript.amicad
< prev
next >
Wrap
Text File
|
1998-08-09
|
1KB
|
46 lines
/* NewScript.AmiCAD, 9 août 1998 © R.Florac, version 1.01e */
/* This script loads a new script in an editor for editing.
It's written for my text editor, Amitex. Adapt it to your
own editor to suit to your needs. */
/* Press the CTRL key while selecting an ARexx menu entry
to call this script under AmiCAD */
signal on error /* for error handling */
signal on syntax
options results
cr='0a'x
port = ADDRESS() /* reads the ARexx port name */
address command
if ~show(p, "AMITEX") then do
f=0 /* the editor was not running */
'run > nil:' "c:AmiTex" /* loads the editor */
waitforport "AMITEX"
end
else f=1 /* it was allready running */
ADDRESS(AMITEX)
if f=1 then 'NEW("New.AmiCAD")' /* ask for opening a new window */
'LOAD("Work:AmiCAD/ARexx/New.AmiCAD")' /* loads the script "New.AmiCAD" */
'ASK("What''s the name'cr'of this new script ?")' /* ask for the title */
titre = result||'.AmiCAD'
if titre ~= "" then 'FILENAME("Work:AmiCAD/ARexx/'titre'")' /* rename the window */
'GOTO(1,10)'
exit
syntax:
address (port)
erreur=RC
'MESSAGE("Script NewScript.amiCAD :"+CHR(10)+"Syntax error"+CHR(10)+"in line 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
exit
error:
address (port)
'MESSAGE("Script NewScript.amiCAD :"+CHR(10)+"Error in line 'SIGL'")'
exit